package com.example.elasticsearch.enums;

import java.util.Arrays;
import java.util.Objects;

public enum AttributeTypeEnum {

	角色(1),
	来源(2)
	;
	
	private int type;
	
	AttributeTypeEnum(int type){
		this.type = type;
	}
	
	public int getValue() {
		return type;
	}
	
	public static String getDesc(Integer value) {
		AttributeTypeEnum promiseStatusDesc = Arrays.stream(values()).filter(e -> Objects.equals(value, e.type)).findFirst().orElse(null);
        return Objects.isNull(promiseStatusDesc) ? "" : promiseStatusDesc.name();
    }

}
